﻿<Window
    x:Class="TagFlo.MainWindow"
    xmlns:c="clr-namespace:TagFlo"
	xmlns:v="clr-namespace:TagFlo.Views"
	
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2006" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  
	
    Title="TagFlo" Height="600" Width="800" Loaded="OnInit" Closing="OnClose"
    Foreground="{DynamicResource ForegroundBrush}"
    BorderBrush="{DynamicResource BorderBrush}"
    Background="{DynamicResource BackgroundBrush}" 
    
    KeyDown="Window_KeyDown"
    >
    <Window.CommandBindings>
        <CommandBinding Command="{x:Static c:MainWindow.AddTagCommand}"
                    Executed="ExecutedAddTagCommand"
                    CanExecute="CanExecuteTagCommand" />
        <CommandBinding Command="{x:Static c:MainWindow.RemoveTagCommand}"
                    Executed="ExecutedRemoveTagCommand"
                    CanExecute="CanExecuteTagCommand" />
    </Window.CommandBindings>

    <Window.Resources>

        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Resources\ResourceDictionary.xaml"/>
                <ResourceDictionary Source="Resources\ControlStyle.xaml"/>
                <ResourceDictionary Source="Themes\current.theme.xaml"/>
            </ResourceDictionary.MergedDictionaries>

            
            <c:PhotoCollectionOrderBy x:Key="PhotoCollectionOrderBy"/>



          
           <!-- <Style x:Key="TagItemStyle" TargetType="{x:Type TreeViewItem}">
                <Setter Property="Template" >
                    <Setter.Value>
                        <ControlTemplate >
                            <Grid Style="{StaticResource TagItemStyle}">

                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="90"/>
                                    <ColumnDefinition Width="15"/>
                                    <ColumnDefinition Width="15"/>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" Grid.ColumnSpan="3" x:Name="PART_Header" 
										  Text="{Binding Path=TagName}" HorizontalAlignment="Left"  />
                                <Button Name="AddTagButton" Foreground="Green"  Grid.Column="1" Content="+" ToolTip="Add tag to all photos"   Width="15" Height="15" Opacity="0" Padding="0" VerticalAlignment="Top" Command="{x:Static c:MainWindow.AddTagCommand}" CommandParameter="{Binding Path=TagName}"/>
                                <Button Name="RemoveTagButton" Foreground="Red"  Grid.Column="2" Content="x" ToolTip="Remove tag from select photos"  Width="15" Height="15" Opacity="0" Padding="0" VerticalAlignment="Top" Command="{x:Static c:MainWindow.RemoveTagCommand}" CommandParameter="{Binding Path=TagName}"/>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="Grid.IsMouseOver" Value="True">
                                    <Trigger.EnterActions>
                                        <BeginStoryboard x:Name="FadeHalfIn" >
                                            <Storyboard TargetName="tbnToggler" >
                                                <DoubleAnimation  Storyboard.TargetProperty="Opacity" Storyboard.TargetName="AddTagButton" To="0" Duration="0:0:.1" />
                                                <DoubleAnimation  Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RemoveTagButton" To="0" Duration="0:0:.1" />
                                            </Storyboard>
                                        </BeginStoryboard>
                                    </Trigger.EnterActions>

                                    <Trigger.ExitActions>
                                        <BeginStoryboard x:Name="FadeHalfOut" >
                                            <Storyboard TargetName="tbnToggler" >
                                                <DoubleAnimation  Storyboard.TargetProperty="Opacity" Storyboard.TargetName="AddTagButton" To="0" Duration="0:0:.1" />
                                                <DoubleAnimation  Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RemoveTagButton" To="0" Duration="0:0:.1" />
                                            </Storyboard>
                                        </BeginStoryboard>
                                    </Trigger.ExitActions>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            
            
            <DataTemplate x:Key="TagTreeViewTemplate">
                <TreeViewItem Style="{StaticResource TagItemStyle}" ContentSource="{Binding}"/>
                
            </DataTemplate>-->


           
            <DataTemplate x:Key="TagTreeViewTemplate">
                <Grid >
                    <Grid.Triggers>
                        <!--<EventTrigger  RoutedEvent="Grid.MouseEnter">
                            <BeginStoryboard Name="MouseEnter">
                                <Storyboard >
                                    <DoubleAnimation   Storyboard.TargetProperty="Opacity" Storyboard.TargetName="AddTagButton"  To="1" Duration="0:0:.1" />
                                    <DoubleAnimation   Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RemoveTagButton"  To="1" Duration="0:0:.1" />
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="Grid.MouseLeave" >
                            
                                <BeginStoryboard  Name="MouseLeaveStoryBoard">
                                    <Storyboard >
                                        <DoubleAnimation  Storyboard.TargetProperty="Opacity" Storyboard.TargetName="AddTagButton" To="0" Duration="0:0:.1" />
                                        <DoubleAnimation  Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RemoveTagButton" To="0" Duration="0:0:.1" />
                                    </Storyboard>
                                </BeginStoryboard>
                       </EventTrigger>
                        <EventTrigger RoutedEvent="Button.Click" SourceName="RemoveTagButton">
                            <RemoveStoryboard BeginStoryboardName="MouseLeaveStoryBoard" />
                        </EventTrigger>-->
                    </Grid.Triggers>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="90"/>
                        <ColumnDefinition Width="15"/>
                        <ColumnDefinition Width="15"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Grid.ColumnSpan="3" x:Name="PART_Header"
										  Text="{Binding Path=TagName}" HorizontalAlignment="Left"  />
                    <Button Name="AddTagButton" Foreground="Green"  Grid.Column="1" Content="+" ToolTip="Add tag to all photos"   Width="15" Height="15"  Padding="0" VerticalAlignment="Top" Command="{x:Static c:MainWindow.AddTagCommand}" CommandParameter="{Binding Path=TagName}"/> 
                    <Button Name="RemoveTagButton" Foreground="Red"  Grid.Column="2" Content="x" ToolTip="Remove tag from select photos"  Width="15" Height="15"  Padding="0" VerticalAlignment="Top" Command="{x:Static c:MainWindow.RemoveTagCommand}" CommandParameter="{Binding Path=TagName}"/>
                </Grid>
            </DataTemplate>

            
            <DataTemplate x:Key="TagSetTemplate">

                <Button Width="75"  Click="TagSetButton_Click" ToolTip="{Binding Path=Text}">
                    <DockPanel>
                        <TextBlock Text="{Binding Path=FunctionKey}" Margin="0,0,5,0" FontSize="8" >
							<TextBlock.Foreground>
								<SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ActiveCaptionColorKey}}"/>
							</TextBlock.Foreground>
                        </TextBlock>
                        <TextBlock Text="{Binding Path=Text}"/>
                    </DockPanel>
                </Button>

            </DataTemplate>



        </ResourceDictionary>


    </Window.Resources>

    <Grid>


        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="185"/>

        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="500*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Border Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"  BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"  VerticalAlignment="Stretch" BorderThickness="0,0,0,1"  Margin="0,0,0,0" Background="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" >

            <DockPanel   Style="{DynamicResource MenuDockPanelStyle}" Margin="0,0,0,0">


                <DockPanel.Background>
                    <LinearGradientBrush EndPoint="1,0" StartPoint="1,1" SpreadMethod="Reflect">
                        <GradientStop Color="{DynamicResource {x:Static SystemColors.GradientActiveCaptionColorKey}}" Offset="0.442"/>
                        <GradientStop Color="{DynamicResource {x:Static SystemColors.GradientInactiveCaptionColorKey}}" Offset="0.505"/>
                        <GradientStop Color="{DynamicResource {x:Static SystemColors.GradientInactiveCaptionColorKey}}" Offset="1"/>
                        <GradientStop Color="{DynamicResource {x:Static SystemColors.GradientActiveCaptionColorKey}}" Offset="0.178"/>
                        <GradientStop Color="{DynamicResource {x:Static SystemColors.GradientInactiveCaptionColorKey}}" Offset="0.005"/>
                    </LinearGradientBrush>
                </DockPanel.Background>


                <Menu Width="auto"  HorizontalAlignment="Left" Background="{x:Null}" Foreground="{DynamicResource {x:Static SystemColors.ActiveCaptionTextBrushKey}}"  Margin="5,0,0,0" VerticalAlignment="Center">
                    <MenuItem  Click="MenuImport_Click" Header="_Folders" VerticalAlignment="Center">
                        <MenuItem.Icon>
                        <Image Source="/TagFlo;component/Icons/folder_add.png" Stretch="None"   />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Header="_Settings" Click="MenuSettings_Click"/>

                    <MenuItem Header="_About" Click="MenuAbout_Click"/>
                  

                    <MenuItem Header="_Help" Click="MenuHelp_Click"/>
                   

                </Menu>



            </DockPanel>
        </Border>
        <v:ImageViewer x:Name="LargeImageViewer" Grid.Row="1" Panel.ZIndex="10" Grid.Column="0" Grid.ColumnSpan="2"  Visibility="Hidden" PreviousImage="LargeImageViewer_PreviousImage" NextImage="LargeImageViewer_NextImage" AddImageToPhotoSet="LargeImageViewer_AddImageToPhotoSet"/>
        <Border VerticalAlignment="Stretch" Panel.ZIndex="0" Grid.Column="0" Grid.Row="1" Grid.RowSpan="1"
                BorderThickness="0,0,1,0" BorderBrush="{StaticResource BorderBrush}"  Background="{StaticResource PanelBackgroundBrush}">
        <Grid  ScrollViewer.CanContentScroll="True">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="35"/>
            </Grid.RowDefinitions>

                <v:SelectionPanel x:Name="PhotoSelectionPanel" FiltersChanged="PhotoSelectionPanel_FilterChanged"  Grid.Row="0" BorderThickness="0" Background="Transparent" /> <!--Style="{StaticResource TreeViewStyle}"-->
            <Button x:Name="SmartSetButton" Click="SmartSetButton_Click" Content="Smart Selection..." Margin="5" VerticalAlignment="Bottom" Grid.Row="1"/>

                
        </Grid>
</Border>
       

           <!-- <DockPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0" LastChildFill="False" Background="{x:Null}" Height="25" Margin="5,2,0,2" VerticalAlignment="Center" HorizontalAlignment="Stretch">
                <ListView x:Name="TagSetListView" DockPanel.Dock="Left" ItemsSource="{Binding}" ItemTemplate="{StaticResource TagSetTemplate}" Style="{StaticResource TagListBoxStyle}" Background="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
                <Button x:Name="TagSetEditButton" DockPanel.Dock="Right" Content="Edit" Click="TagSetEditButton_Click"/>
                <ComboBox x:Name="TagSetComboBox"  DockPanel.Dock="Right" Width="140"  DropDownClosed="TagSetComboBox_DropDownClosed" ItemsSource="{Binding Path=TagSetTable}" ItemTemplate="{StaticResource TagSetComboBoxTemplate}" />
            </DockPanel>-->

            <Grid  Grid.Column="1" Grid.Row="1" Panel.ZIndex="0"  >
            <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <Border  Grid.Row="0" DockPanel.Dock="Top" Panel.ZIndex="1" Background="{StaticResource PanelBackgroundBrush}"  BorderBrush="{StaticResource BorderBrush}" Margin="15,5,25,0" VerticalAlignment="Center" BorderThickness="1,1,1,1" CornerRadius="3,3,3,3" Padding="5,2,5,2">

                    <Border.BitmapEffect>

                        <DropShadowBitmapEffect   ShadowDepth="3" Direction="320" Opacity="0.5" Color="DarkGray" />
                    </Border.BitmapEffect>

                    <DockPanel Height="25" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="0,2,0,2">
                        <TextBlock Text="Displaying:" DockPanel.Dock="Left" Margin="5,5,5,5" VerticalAlignment="Center" Foreground="{StaticResource ForegroundBrush}"/>

                    <TextBlock x:Name="txtSelection" Text="{Binding ElementName=PhotoSelectionPanel, Path=FiltersDescription}" DockPanel.Dock="Left" Margin="5,5,0,5" VerticalAlignment="Center" Foreground="{StaticResource ForegroundBrush}" FontSize="10" />



                    <ComboBox IsSynchronizedWithCurrentItem="True" Foreground="{StaticResource ForegroundBrush}" SelectedIndex="0"  DockPanel.Dock="Right" HorizontalAlignment="Right"   x:Name="PhotoSortComboBox"  SelectionChanged="PhotoSortComboBox_SelectionChanged" ToolTip="Select Sorting for Photos..."   VerticalAlignment="Center"   >
                            <ComboBoxItem Content="Date"/>
                            <ComboBoxItem Content="Rating"/>
                            <ComboBoxItem Content="ISO Speed"/>
                            <ComboBoxItem Content="Exposure Time"/>
                            <ComboBoxItem Content="Focal Length"/>
                            <ComboBoxItem Content="Lens Aperture"/>
                            <ComboBoxItem Content="Camera Model"/>
                            <ComboBoxItem Content="Width"/>
                            <ComboBoxItem Content="Height"/>
                        </ComboBox>
                        <TextBlock Height="20"  DockPanel.Dock="Right"  HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="{StaticResource ForegroundBrush}" Margin="0,5,7,5">
							<Run Text="Sort by:"/>
                        </TextBlock>


                    </DockPanel>
                </Border>
                <!--<c:PhotoScroller x:Name="PhotoListBox" ItemContainerStyle="{StaticResource PhotoListBoxItemStyle}"
									ItemsSource="{Binding}" SelectionChanged="PhotoListBox_SelectionChanged"
								 DockPanel.Dock="Bottom" Background="{x:Null}" />-->


                <c:PhotoGrid x:Name="PhotoListBox" Grid.RowSpan="2" Panel.ZIndex="0"    ItemContainerStyle="{StaticResource PhotoListBoxItemStyle}" 
					SelectionChanged="PhotoListBox_SelectionChanged" MouseDoubleClick="PhotoListBox_MouseDoubleClick"
                    PreviewKeyDown="LargeImage_PreviewKeyDown"         
					ItemsSource="{Binding}"
			DockPanel.Dock="Bottom" Background="{x:Null}"  />
            
            <!--ItemsSource="{Binding}"-->
<!--			ItemsSource="{Binding UpdateSourceTrigger=Explicit}"-->
			


            </Grid>


            <!--"{Binding Source={StaticResource PhotoData}, Path=Photos}" <Expander x:Name="SelectedExpander"   ExpandDirection="Right" Grid.Column="1" Grid.Row="1" IsExpanded="True"  Background="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"  >-->

        <Border Width="185" Grid.Column="2" Grid.Row="1" Panel.ZIndex="0" Background="{StaticResource PanelBackgroundBrush}" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1,0,0,0">
            <StackPanel  x:Name="CurrentSelectionStackPanel" Margin="5,0,5,0" Orientation="Vertical" HorizontalAlignment="Center" >

                
                <StackPanel Orientation="Vertical" Margin="0,10,0,5">
                    <TextBlock x:Name="CurrentSelectionText"    Foreground="{StaticResource ForegroundBrush}" TextAlignment="Center" FontSize="12"/>
                   <!-- <TextBlock x:Name="CurrentSelectionDateText" Foreground="{StaticResource ForegroundBrush}" TextAlignment="Center" FontSize="12"/>-->

                    <DockPanel HorizontalAlignment="Stretch" Margin="0,5,0,0">
                        <TextBlock x:Name="CurrentSelectionIsoText" Foreground="{StaticResource ForegroundBrush}" TextAlignment="Center" FontSize="12" Width="75" FontWeight="Bold" />
                        <TextBlock x:Name="CurrentSelectionLensText" Foreground="{StaticResource ForegroundBrush}" TextAlignment="Center" FontSize="12" Width="75" FontWeight="Bold" />
                    </DockPanel>
                    <DockPanel HorizontalAlignment="Stretch" Margin="0,0,0,5">

                        <TextBlock x:Name="CurrentSelectionApertureText" Foreground="{StaticResource ForegroundBrush}" TextAlignment="Center" FontSize="12" Width="75" FontWeight="Bold" />
                        <TextBlock x:Name="CurrentSelectionShutterSpeedText" Foreground="{StaticResource ForegroundBrush}" TextAlignment="Center" FontSize="12" Width="75" FontWeight="Bold" />

                    </DockPanel>
                </StackPanel>

                <!--<Expander Style="{StaticResource MetaExpander}" Header="Info" Foreground="{StaticResource ForegroundBrush}">

                    </Expander>-->

                <Expander Style="{StaticResource MetaExpander}" Header="Rating" MouseLeave="ButtonStars_MouseLeave" Foreground="{StaticResource ForegroundBrush}">

                    <StackPanel x:Name="starStack" Orientation="Horizontal" HorizontalAlignment="Center" Height="50" />

                </Expander>
                <Expander Style="{StaticResource MetaExpander}" Header="Tag Sets" Foreground="{StaticResource ForegroundBrush}" >

                    <StackPanel Orientation="Vertical" MinHeight="150">
                        <DockPanel>
                            <ComboBox x:Name="TagSetComboBox"  DockPanel.Dock="Left" Width="130"  DropDownClosed="TagSetComboBox_DropDownClosed" ItemsSource="{Binding}" DisplayMemberPath="TagSetName" />

                            <Button x:Name="TagSetEditButton" DockPanel.Dock="Right" Content="+" Click="TagSetEditButton_Click"/>

                        </DockPanel>
                        <ListView x:Name="TagSetListView" ItemsSource="{Binding}" ItemTemplate="{StaticResource TagSetTemplate}" Style="{StaticResource TagListBoxStyle}" Background="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
                    </StackPanel>
                </Expander>
                <Expander Style="{StaticResource MetaExpander}" Header="Tags" Foreground="{StaticResource ForegroundBrush}">

                    <StackPanel Orientation="Vertical" Margin="0,0,0,10" MinHeight="150">
<ComboBox x:Name="TagComboBox" PreviewKeyDown="TagComboBox_PreviewKeyDown"  />
                    <!--   <Button x:Name="AddTagButton" Content="Add a Tag..." Click="TagTextButton_Click" Width="140"/>
                        <Popup x:Name="TagPopup" Width="140" HorizontalAlignment="Center"  MaxHeight="250" StaysOpen="False" Placement="Relative">
                            <Border BorderBrush="Beige" BorderThickness="1">
                                <StackPanel FocusManager.IsFocusScope="True" >
                                    <TextBox x:Name="TagTextBox"
											PreviewKeyDown="TagTextBox_PreviewKeyDown"
											TextChanged="TagTextBox_TextChanged" DockPanel.Dock="Top" Focusable="True" />
                                    <ListBox x:Name="TagListBox" DockPanel.Dock="Bottom"
											ScrollViewer.CanContentScroll="True"
											ScrollViewer.VerticalScrollBarVisibility="Auto"
											ScrollViewer.HorizontalScrollBarVisibility="Disabled"
											PreviewKeyDown="TagListBox_PreviewKeyDown"
											
											/>
                                </StackPanel>
                            </Border>

                        </Popup>-->


                        <DockPanel Margin="0,5,0,5" >
                            <TextBlock FontWeight="Bold" Text="Tags:" DockPanel.Dock="Top" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" FontSize="12" />
                            <TreeView x:Name="TagSelectionTreeView" ItemTemplate="{StaticResource TagTreeViewTemplate}" DockPanel.Dock="Bottom" BorderThickness="0" ScrollViewer.VerticalScrollBarVisibility="Auto" Background="{x:Null}"/>

                        </DockPanel>
                    </StackPanel>
                </Expander>
                <Expander Style="{StaticResource MetaExpander}" Header="MetaData" Foreground="{StaticResource ForegroundBrush}">
                    <StackPanel>
                        <TextBlock FontWeight="Bold"  Text="Title:"  Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" FontSize="12" />
                        <TextBox x:Name="CurrentSelectionTitleText" LostKeyboardFocus="MetaData_LostKeyboardFocus" PreviewKeyDown="MetaData_PreviewKeyDown" FontSize="12" BorderBrush="DarkGray" />
                        <TextBlock FontWeight="Bold"  Text="Subject:" Margin="0,5,0,0"  Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" FontSize="12" />
                        <TextBox x:Name="CurrentSelectionSubjectText" LostKeyboardFocus="MetaData_LostKeyboardFocus" PreviewKeyDown="MetaData_PreviewKeyDown" FontSize="12" BorderBrush="DarkGray" />
                        <TextBlock FontWeight="Bold"  Text="Comment:" Margin="0,5,0,0" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" FontSize="12" />
                        <TextBox x:Name="CurrentSelectionCommentText" LostKeyboardFocus="MetaData_LostKeyboardFocus" PreviewKeyDown="MetaData_PreviewKeyDown" TextWrapping="Wrap" FontSize="12" BorderBrush="DarkGray" />

                    </StackPanel>
                </Expander>
                <Expander Style="{StaticResource MetaExpander}" Header="Fix" Foreground="{StaticResource ForegroundBrush}">
                    <DockPanel>
                        <Button Content="Rotate Left" Click="RotateLeftButton_Click" />
                        <Button Content="Rotate Right" Click="RotateRightButton_Click" />
                        </DockPanel>
                </Expander>
                <Button Content="Export Photos" Click="ExportPhotoButton_Click" />

            </StackPanel>
        </Border>
        <!--</Expander>-->




       



        <!--<GridSplitter HorizontalAlignment="Left" x:Name="SelectGridSplitter" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2" ResizeDirection="Columns" Width="5" />-->
      <c:SetListBox x:Name="PhotoSetListBox" ItemsSource="{Binding}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3" VerticalAlignment="Bottom" DockPanel.Dock="Bottom" Background="{StaticResource PanelBackgroundBrush}" PhotoSetChange="PhotoSetListBox_PhotoSetChange"/>
        <Popup x:Name="StatusPopup" PopupAnimation="Fade" AllowsTransparency="True"  Height="150" StaysOpen="True" Placement="Bottom" VerticalOffset="-150" HorizontalOffset="10"  Grid.Row="2" Grid.Column="0"  VerticalAlignment="Bottom" Width="150"   >
            <Border BorderBrush="{StaticResource BorderBrush}"  Background="{StaticResource BackgroundBrush}"  BorderThickness="2,2,2,0"  CornerRadius="3,3,0,0" Opacity="0.90">
                <StackPanel>
                    <Image x:Name="StatusImage"  />
                    <TextBlock x:Name="StatusText"
                                   Text="Status Information"
                                   VerticalAlignment="Center"
                                   HorizontalAlignment="Center"
                                    />
                </StackPanel>
            </Border>
        </Popup>

    </Grid>
</Window>
